﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            mianji();
            siwei();
            max();
        }
        public static void mianji()
        {


            const double Pi = 3.14;

            Console.WriteLine("请输入一个圆的半径");
            string str = Console.ReadLine();
            double f1 = Convert.ToDouble(str);
            Console.WriteLine(Pi* f1 * f1);

        }

        public static void siwei()
        {
            Console.WriteLine("请输入一个四位整数");
            int num = Convert.ToInt32(Console.ReadLine());

            int qian = num / 1000;
            int bai = num / 100 % 10;
            int shi = num / 10 % 10;
            int ge = num % 10;
            Console.WriteLine("用户输入的千位为" + qian + "，百位为" + bai + "，十位为" + shi + "，个位为" + ge);
        }

        public static void max() 
        {
            //if (num1>num2 && num2>num3)
            //{
            //    Console.WriteLine("最大值为"+num1);
            //}
            //else if (num1 > num3 && num3 > num2)
            //{
            //    Console.WriteLine("最大值为" + num1);
            //}

            //if (num2 > num1 && num2 > num3)
            //{
            //    Console.WriteLine("最大值为" + num2);
            //}
            //else if (num2>num3 && num3 >num1)
            //{
            //    Console.WriteLine("最大值为" + num2);
            //}

            //if (num3 > num1 && num3 > num2)
            //{
            //    Console.WriteLine("最大值为" + num3);
            //}
            //else if (num3 > num2 && num2 > num1)
            //{
            //    Console.WriteLine("最大值为" + num3);
            //}


            Console.WriteLine("请输入第一个数");
            int num1 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("请输入第二个数");
            int num2 = Convert.ToInt32(Console.ReadLine());
            Console.WriteLine("请输入第三个数");
            int num3 = Convert.ToInt32(Console.ReadLine());

            if (num1 > num2 && num1 > num3)
            {
                Console.WriteLine("最大值为" + num1);
            }
            else if (num2 > num3)
            {
                Console.WriteLine("最大值为" + num2);
            }
            else
            {
                Console.WriteLine("最大值为" + num3);
            }




        }



    }
}
